package com.src;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewStub;
import android.widget.Button;
import android.widget.TextView;

public class AndroidWithDiYViewActivity extends Activity {

	private TextView textView = null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		// View layoutOne = getLayoutInflater().inflate(R.id.includeTwo, null);
		// View layoutTwo = getLayoutInflater().inflate(R.id.includeTwo, null);
		// textView = (TextView) layoutOne.findViewById(R.id.textView);
		// if (textView == null) {
		// System.out.println("Text is Null");
		// }
		// textView.setText("HelloWorld");

		// ((ViewStub) findViewById(R.id.viewStub)).setVisibility(View.VISIBLE);
		ViewStub stub = (ViewStub) findViewById(R.id.viewStub);

		View inflated = stub.inflate();

//		View importPanel = ((ViewStub) findViewById(R.id.viewStub)).inflate();
		textView = (TextView) inflated.findViewById(R.id.textView);
		textView.setText("HelloWorld");

	}
}